package org.apache.commons.graph.bean

interface Edge<V> {
    val source: V

    val target: V

    fun reverse(): Edge<V>
}

fun interface EdgeFactory<V, E:Edge<V>> {
    fun createEdge(source: V, target: V): E
}

fun <V> Edge(source: V, target: V): Edge<V> = DefaultEdge(source, target)
